package com.comment.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.checker.units.qual.A;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author pgx
 * @since 2022-09-09
 */
@TableName("tb_client_comments")
@ApiModel(value = "ClientComments对象", description = "")
@AllArgsConstructor
@Data
@NoArgsConstructor
public class ClientComments implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    @ApiModelProperty("商品id")
    private String goodsId;

    @ApiModelProperty("店铺id")
    private String shopId;

    @ApiModelProperty("评分 0好评 1差评")
    private String degree;

    @ApiModelProperty("评论时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMt+8")
    private LocalDateTime comdate;

    @ApiModelProperty("评论内容")
    private String description;

    @ApiModelProperty("用户名称")
    private String uid;

    @ApiModelProperty("逻辑删除 0不删除 1删除")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;


}
